package priv.mill.server.impl;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import priv.mill.dao.mapper.RolePowerMapper;
import priv.mill.entry.RolePower;
import priv.mill.server.RolePowerService;

@Component
public class RolePowerServiceImpl implements RolePowerService{

	private static final Logger logger = Logger
			.getLogger(RolePowerServiceImpl.class);

	@Autowired
	private RolePowerMapper rolePowerMapper;
	
	@Override
	public RolePower getRolePowerById(Integer rolePowerId) {
		return rolePowerMapper.getRolePowerById(rolePowerId);
	}

	@Override
	public RolePower getRolePowerByEntry(RolePower rolePower) {
		return rolePowerMapper.getRolePowerByEntry(rolePower);
	}

	@Override
	public List<RolePower> getRolePowersByPage(RolePower rolePower) {
		return rolePowerMapper.getRolePowersByPage(rolePower);
	}

	@Override
	public int updateRolePower(RolePower rolePower) {
		return rolePowerMapper.updateRolePower(rolePower);
	}

	@Override
	public int insertRolePower(RolePower rolePower) {
		return rolePowerMapper.insertRolePower(rolePower);
	}

	@Override
	public int deleteRolePower(Integer rolePowerId) {
		return rolePowerMapper.deleteRolePower(rolePowerId);
	}
}
